package cn.mldn.experiment.threadOfProducerAndConsumer;

/*
 * 定义消费者
 */
public class Consumer implements Runnable
{ 
	private Message msg = null;

	public Consumer(Message msg)
	{
		this.msg = msg;
	}

	@Override
	public void run()
	{
		for (int x = 0; x < 50; x++)
		{ // 取走50次数据
			System.out.println(this.msg.get()); // 取得属性
		}
	}
}